package com.nirvana.flatbuffers;


import java.util.Set;

/**
 * Copyright (c) 2022 Aoshu.Co.Ltd. All rights reserved.
 *
 * @author :    zhouqichun
 * @create :    2025/11/13 14:09
 * @description :
 **/
public class BaseResolver implements IResolve {
    private final Set<String> baseTypes = Set.of(
            "Byte",
            "Short",
            "Int",
            "Long",
            "Boolean",
            "Float",
            "Double"
    );
    @Override
    public boolean canResolve(String propertyType) {
        return baseTypes.contains(propertyType);
    }

    @Override
    public String resolve(StringBuilder objectPreContent, String defName, String propertyName, String propertyType) {
        return "m." + propertyName;
    }

    @Override
    public String resolveVector(StringBuilder objectPreContent, String defName, String propertyName, String propertyType) {
        return "m." + propertyName;
    }

}
